#ifndef PHYSIC_COMPONENTS
#define PHYSIC_COMPONENTS

#include "Base/Component.h"
#include <SFML/system.hpp>

enum {NONE, STATIC, DYNAMIC, JUMPING};

class PhysicComponent : public BPL::Component
{
public:
	PhysicComponent():type(NONE),collide(false){}
    static const int familyId = 1;

    sf::Vector2f sizeBox;
    int type;

	// COLLIDE INFORMATION
	int collideWith;
	sf::Vector2f normalCollision;
	bool collide;
	bool collideXWithNoSlope;
	bool collideYWithNoSlope;
};
typedef boost::shared_ptr<PhysicComponent> PhysicComponentPtr;

class StaticComponent : public PhysicComponent
{
public:
	StaticComponent():PhysicComponent(){type = STATIC;}
	enum{FULL, SLOPERIGHT, SLOPELEFT};
	int typeStatic;
};
typedef boost::shared_ptr<StaticComponent> StaticComponentPtr;

class DynamicComponent : public PhysicComponent
{
public:
	DynamicComponent():moveDirection(0.0f,0.0f),PhysicComponent(){type = DYNAMIC;}
	sf::Vector2f moveDirection;
	float speed;
};
typedef boost::shared_ptr<DynamicComponent> DynamicComponentPtr;

class JumpingComponent : public DynamicComponent
{
public:
	JumpingComponent():DynamicComponent(),jump(false),jumpState(1),jumpLength(1),jumpSpeed(1){type = JUMPING;}
	float jumpSpeed;
	float jumpState;
	float jumpLength;
	bool jump;

};
typedef boost::shared_ptr<JumpingComponent> JumpingComponentPtr;


#endif
